.class public Llt/noframe/gpsfarmguide/views/FragmentTracksList;
.super Landroidx/fragment/app/Fragment;
.source "FragmentTracksList.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentOnBackPressed;
.implements Landroid/view/ActionMode$Callback;


# instance fields
.field Acmode:Landroid/view/ActionMode;

.field private TAG_INI:Ljava/lang/String;

.field private adapt:Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;

.field private fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

.field groupAdapter:Landroid/widget/ArrayAdapter;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/widget/ArrayAdapter<",
            "Llt/noframe/gpsfarmguide/models/MeasureListModel;",
            ">;"
        }
    .end annotation
.end field

.field private groupId:I

.field private groups:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/models/MeasureListModel;",
            ">;"
        }
    .end annotation
.end field

.field private groupsSpinner:Landroid/widget/Spinner;

.field groupsSpinnerListener:Landroid/widget/AdapterView$OnItemSelectedListener;

.field private lastgroup:Llt/noframe/gpsfarmguide/models/MeasureListModel;

.field listItemClick:Landroid/widget/AdapterView$OnItemClickListener;

.field listSelectionClick:Landroid/widget/AdapterView$OnItemClickListener;

.field private listV:Landroid/widget/ListView;

.field private listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

.field private measureType:I

.field private measures:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;",
            ">;"
        }
    .end annotation
.end field

.field runtimePermissions:Llt/noframe/gpsfarmguide/utils/RuntimePermissions;

.field private scroll:I

.field private selection:Z

.field private selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

.field private tracksDialogs:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

.field private typesSpinner:Landroid/widget/Spinner;

.field typesSpinnerListener:Landroid/widget/AdapterView$OnItemSelectedListener;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 85
    invoke-direct {p0}, Landroidx/fragment/app/Fragment;-><init>()V

    const-string v0, "ini"

    .line 52
    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->TAG_INI:Ljava/lang/String;

    .line 53
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    .line 68
    new-instance v0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->tracksDialogs:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    .line 334
    new-instance v0, Llt/noframe/gpsfarmguide/views/FragmentTracksList$3;

    invoke-direct {v0, p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList$3;-><init>(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listItemClick:Landroid/widget/AdapterView$OnItemClickListener;

    .line 380
    new-instance v0, Llt/noframe/gpsfarmguide/views/FragmentTracksList$4;

    invoke-direct {v0, p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList$4;-><init>(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listSelectionClick:Landroid/widget/AdapterView$OnItemClickListener;

    .line 400
    new-instance v0, Llt/noframe/gpsfarmguide/views/FragmentTracksList$5;

    invoke-direct {v0, p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList$5;-><init>(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinnerListener:Landroid/widget/AdapterView$OnItemSelectedListener;

    .line 428
    new-instance v0, Llt/noframe/gpsfarmguide/views/FragmentTracksList$6;

    invoke-direct {v0, p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList$6;-><init>(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->typesSpinnerListener:Landroid/widget/AdapterView$OnItemSelectedListener;

    return-void
.end method

.method static synthetic access$002(Llt/noframe/gpsfarmguide/views/FragmentTracksList;I)I
    .locals 0

    .line 44
    iput p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->scroll:I

    return p1
.end method

.method static synthetic access$100(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)Ljava/util/List;
    .locals 0

    .line 44
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    return-object p0
.end method

.method static synthetic access$1002(Llt/noframe/gpsfarmguide/views/FragmentTracksList;Llt/noframe/gpsfarmguide/models/MeasureListModel;)Llt/noframe/gpsfarmguide/models/MeasureListModel;
    .locals 0

    .line 44
    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->lastgroup:Llt/noframe/gpsfarmguide/models/MeasureListModel;

    return-object p1
.end method

.method static synthetic access$1100(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)V
    .locals 0

    .line 44
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->createList()V

    return-void
.end method

.method static synthetic access$1200(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)Landroid/widget/Spinner;
    .locals 0

    .line 44
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->typesSpinner:Landroid/widget/Spinner;

    return-object p0
.end method

.method static synthetic access$200(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)Llt/noframe/gpsfarmguide/analytics/FireAnalytics;
    .locals 0

    .line 44
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    return-object p0
.end method

.method static synthetic access$300(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)I
    .locals 0

    .line 44
    iget p0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measureType:I

    return p0
.end method

.method static synthetic access$302(Llt/noframe/gpsfarmguide/views/FragmentTracksList;I)I
    .locals 0

    .line 44
    iput p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measureType:I

    return p1
.end method

.method static synthetic access$400(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;
    .locals 0

    .line 44
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->tracksDialogs:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    return-object p0
.end method

.method static synthetic access$500(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;
    .locals 0

    .line 44
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    return-object p0
.end method

.method static synthetic access$600(Llt/noframe/gpsfarmguide/views/FragmentTracksList;I)V
    .locals 0

    .line 44
    invoke-direct {p0, p1}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setSelectioncount(I)V

    return-void
.end method

.method static synthetic access$700(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)Ljava/lang/String;
    .locals 0

    .line 44
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->TAG_INI:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic access$800(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)Landroid/widget/Spinner;
    .locals 0

    .line 44
    iget-object p0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinner:Landroid/widget/Spinner;

    return-object p0
.end method

.method static synthetic access$902(Llt/noframe/gpsfarmguide/views/FragmentTracksList;I)I
    .locals 0

    .line 44
    iput p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupId:I

    return p1
.end method

.method private createList()V
    .locals 5

    .line 161
    new-instance v0, Llt/noframe/gpsfarmguide/database/DbTracks;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/database/DbTracks;-><init>()V

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->lastgroup:Llt/noframe/gpsfarmguide/models/MeasureListModel;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->getId()I

    move-result v1

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/database/DbTracks;->getTracks(I)Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    .line 163
    iget-boolean v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selection:Z

    if-eqz v0, :cond_0

    .line 164
    new-instance v0, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-virtual {v3}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v3

    iget-object v4, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listV:Landroid/widget/ListView;

    invoke-direct {v0, v1, v2, v3, v4}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;-><init>(Landroid/app/Activity;Ljava/util/List;Landroid/os/Bundle;Landroid/widget/ListView;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    .line 165
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {v0, v1}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->setAdapter(Lse/emilsjolander/stickylistheaders/StickyListHeadersAdapter;)V

    .line 166
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listSelectionClick:Landroid/widget/AdapterView$OnItemClickListener;

    invoke-virtual {v0, v1}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 167
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->setOnItemLongClickListener(Landroid/widget/AdapterView$OnItemLongClickListener;)V

    goto :goto_0

    .line 169
    :cond_0
    new-instance v0, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v3

    invoke-virtual {v3}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v3

    iget-object v4, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listV:Landroid/widget/ListView;

    invoke-direct {v0, v1, v2, v3, v4}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;-><init>(Landroid/app/Activity;Ljava/util/List;Landroid/os/Bundle;Landroid/widget/ListView;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->adapt:Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;

    .line 170
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->adapt:Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;

    invoke-virtual {v0, v1}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->setAdapter(Lse/emilsjolander/stickylistheaders/StickyListHeadersAdapter;)V

    .line 171
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listItemClick:Landroid/widget/AdapterView$OnItemClickListener;

    invoke-virtual {v0, v1}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 175
    :goto_0
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    const v1, 0x7f010023

    invoke-static {v0, v1}, Landroid/view/animation/AnimationUtils;->loadLayoutAnimation(Landroid/content/Context;I)Landroid/view/animation/LayoutAnimationController;

    move-result-object v0

    .line 176
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    invoke-virtual {v1, v0}, Landroid/widget/FrameLayout;->setLayoutAnimation(Landroid/view/animation/LayoutAnimationController;)V

    .line 178
    :try_start_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    iget v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->scroll:I

    invoke-virtual {v0, v1}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->setSelection(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 180
    :goto_1
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentTracksList$2;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList$2;-><init>(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)V

    invoke-virtual {v0, v1}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->setOnScrollListener(Landroid/widget/AbsListView$OnScrollListener;)V

    return-void
.end method

.method private ini()V
    .locals 3

    .line 143
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    const v1, 0x7f0900f4

    invoke-virtual {v0, v1}, Landroid/app/Activity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 144
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    const v1, 0x7f090159

    invoke-virtual {v0, v1}, Landroid/app/Activity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    .line 145
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    invoke-virtual {v0}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->getWrappedList()Landroid/widget/ListView;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listV:Landroid/widget/ListView;

    .line 146
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    const v2, 0x7f0900f8

    invoke-virtual {v1, v2}, Landroid/app/Activity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    invoke-virtual {v0, v1}, Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;->setEmptyView(Landroid/view/View;)V

    .line 147
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/app/Activity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    const v1, 0x7f11015d

    .line 148
    invoke-virtual {p0, v1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const/4 v0, 0x0

    .line 149
    iput v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupId:I

    const/4 v0, 0x2

    .line 150
    iput v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measureType:I

    .line 151
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setUpMeasureTypes()V

    .line 152
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setUpGroups()V

    return-void
.end method

.method public static newInstance()Llt/noframe/gpsfarmguide/views/FragmentTracksList;
    .locals 1

    .line 71
    new-instance v0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;-><init>()V

    return-object v0
.end method

.method public static newInstance(I)Llt/noframe/gpsfarmguide/views/FragmentTracksList;
    .locals 3

    .line 77
    new-instance v0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;-><init>()V

    .line 78
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    const-string v2, "field_id"

    .line 79
    invoke-virtual {v1, v2, p0}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 80
    invoke-virtual {v0, v1}, Landroidx/fragment/app/Fragment;->setArguments(Landroid/os/Bundle;)V

    return-object v0
.end method

.method private setSelectioncount(I)V
    .locals 3

    .line 273
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->Acmode:Landroid/view/ActionMode;

    if-eqz v0, :cond_0

    .line 274
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, " "

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p1

    const v2, 0x7f1101bc

    invoke-virtual {p1, v2}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Landroid/view/ActionMode;->setTitle(Ljava/lang/CharSequence;)V

    :cond_0
    return-void
.end method

.method private setUpGroups()V
    .locals 6

    .line 200
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    const v1, 0x7f090171

    invoke-virtual {v0, v1}, Landroid/app/Activity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Spinner;

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinner:Landroid/widget/Spinner;

    .line 201
    invoke-static {}, Llt/noframe/gpsfarmguide/database/DB;->getDB()Llt/noframe/gpsfarmguide/database/DB;

    move-result-object v0

    const/4 v1, 0x0

    const/4 v2, 0x2

    invoke-virtual {v0, v2, v1}, Llt/noframe/gpsfarmguide/database/DB;->getMeasuresForList(II)Ljava/util/List;

    move-result-object v0

    .line 202
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    iput-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    .line 203
    new-instance v2, Llt/noframe/gpsfarmguide/database/DbTracks;

    invoke-direct {v2}, Llt/noframe/gpsfarmguide/database/DbTracks;-><init>()V

    if-eqz v0, :cond_1

    .line 204
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v3

    if-lez v3, :cond_1

    const/4 v3, 0x0

    .line 205
    :goto_0
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v4

    if-ge v3, v4, :cond_1

    .line 206
    invoke-interface {v0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Llt/noframe/gpsfarmguide/models/MeasureListModel;

    invoke-virtual {v4}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->getId()I

    move-result v4

    invoke-virtual {v2, v4}, Llt/noframe/gpsfarmguide/database/DbTracks;->getTracksCount(I)I

    move-result v4

    if-lez v4, :cond_0

    .line 207
    iget-object v4, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    invoke-interface {v0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    invoke-interface {v4, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_0
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 209
    :cond_1
    new-instance v0, Llt/noframe/gpsfarmguide/models/MeasureListModel;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/models/MeasureListModel;-><init>()V

    const v2, 0x7f110024

    .line 210
    invoke-virtual {p0, v2}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->setName(Ljava/lang/String;)V

    .line 211
    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->setId(I)V

    .line 212
    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    invoke-interface {v2, v1, v0}, Ljava/util/List;->add(ILjava/lang/Object;)V

    .line 213
    new-instance v0, Landroid/widget/ArrayAdapter;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v2

    const v3, 0x1090008

    iget-object v4, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    invoke-direct {v0, v2, v3, v4}, Landroid/widget/ArrayAdapter;-><init>(Landroid/content/Context;ILjava/util/List;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupAdapter:Landroid/widget/ArrayAdapter;

    .line 215
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupAdapter:Landroid/widget/ArrayAdapter;

    const v2, 0x1090009

    invoke-virtual {v0, v2}, Landroid/widget/ArrayAdapter;->setDropDownViewResource(I)V

    .line 216
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinner:Landroid/widget/Spinner;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupAdapter:Landroid/widget/ArrayAdapter;

    invoke-virtual {v0, v2}, Landroid/widget/Spinner;->setAdapter(Landroid/widget/SpinnerAdapter;)V

    .line 217
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinner:Landroid/widget/Spinner;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->TAG_INI:Ljava/lang/String;

    invoke-virtual {v0, v2}, Landroid/widget/Spinner;->setTag(Ljava/lang/Object;)V

    .line 218
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinner:Landroid/widget/Spinner;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinnerListener:Landroid/widget/AdapterView$OnItemSelectedListener;

    invoke-virtual {v0, v2}, Landroid/widget/Spinner;->setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)V

    .line 220
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->lastgroup:Llt/noframe/gpsfarmguide/models/MeasureListModel;

    if-eqz v0, :cond_3

    const/4 v0, 0x0

    .line 221
    :goto_1
    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-ge v0, v2, :cond_3

    .line 222
    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->lastgroup:Llt/noframe/gpsfarmguide/models/MeasureListModel;

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->getId()I

    move-result v2

    iget-object v3, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    invoke-interface {v3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/models/MeasureListModel;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->getId()I

    move-result v3

    if-ne v2, v3, :cond_2

    .line 224
    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinner:Landroid/widget/Spinner;

    invoke-virtual {v2, v0}, Landroid/widget/Spinner;->setSelection(I)V

    const/4 v0, 0x1

    goto :goto_2

    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_3
    const/4 v0, 0x0

    :goto_2
    if-nez v0, :cond_4

    .line 230
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinner:Landroid/widget/Spinner;

    invoke-virtual {v0}, Landroid/widget/Spinner;->getSelectedItem()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/models/MeasureListModel;

    .line 231
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->getId()I

    move-result v2

    iput v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupId:I

    .line 232
    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->lastgroup:Llt/noframe/gpsfarmguide/models/MeasureListModel;

    .line 233
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->createList()V

    .line 237
    :cond_4
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;

    move-result-object v0

    if-eqz v0, :cond_5

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getArguments()Landroid/os/Bundle;

    move-result-object v0

    const-string v2, "field_id"

    invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v0

    goto :goto_3

    :cond_5
    const/4 v0, 0x0

    :goto_3
    if-eqz v0, :cond_7

    .line 240
    :goto_4
    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-ge v1, v2, :cond_7

    .line 241
    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Llt/noframe/gpsfarmguide/models/MeasureListModel;

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->getId()I

    move-result v2

    if-ne v0, v2, :cond_6

    .line 243
    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupsSpinner:Landroid/widget/Spinner;

    invoke-virtual {v2, v1}, Landroid/widget/Spinner;->setSelection(I)V

    .line 244
    iget-object v2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groups:Ljava/util/List;

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/models/MeasureListModel;

    iput-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->lastgroup:Llt/noframe/gpsfarmguide/models/MeasureListModel;

    .line 245
    iput v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->groupId:I

    .line 246
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->createList()V

    goto :goto_5

    :cond_6
    add-int/lit8 v1, v1, 0x1

    goto :goto_4

    :cond_7
    :goto_5
    return-void
.end method

.method private setUpMeasureTypes()V
    .locals 3

    .line 260
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    const v1, 0x7f090174

    invoke-virtual {v0, v1}, Landroid/app/Activity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Spinner;

    iput-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->typesSpinner:Landroid/widget/Spinner;

    .line 262
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    const v1, 0x7f030008

    const v2, 0x1090008

    .line 261
    invoke-static {v0, v1, v2}, Landroid/widget/ArrayAdapter;->createFromResource(Landroid/content/Context;II)Landroid/widget/ArrayAdapter;

    move-result-object v0

    const v1, 0x1090009

    .line 263
    invoke-virtual {v0, v1}, Landroid/widget/ArrayAdapter;->setDropDownViewResource(I)V

    .line 264
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->typesSpinner:Landroid/widget/Spinner;

    invoke-virtual {v1, v0}, Landroid/widget/Spinner;->setAdapter(Landroid/widget/SpinnerAdapter;)V

    .line 265
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->typesSpinner:Landroid/widget/Spinner;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->TAG_INI:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/Spinner;->setTag(Ljava/lang/Object;)V

    .line 266
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->typesSpinner:Landroid/widget/Spinner;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->typesSpinnerListener:Landroid/widget/AdapterView$OnItemSelectedListener;

    invoke-virtual {v0, v1}, Landroid/widget/Spinner;->setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)V

    .line 267
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->typesSpinner:Landroid/widget/Spinner;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/Spinner;->setSelection(I)V

    return-void
.end method


# virtual methods
.method public onActionItemClicked(Landroid/view/ActionMode;Landroid/view/MenuItem;)Z
    .locals 2

    .line 471
    invoke-interface {p2}, Landroid/view/MenuItem;->getItemId()I

    move-result p1

    const p2, 0x7f090067

    const/4 v0, 0x0

    if-eq p1, p2, :cond_2

    const p2, 0x7f09006c

    if-eq p1, p2, :cond_0

    goto :goto_1

    .line 475
    :cond_0
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    const/4 p2, 0x0

    .line 476
    :goto_0
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;->getCount()I

    move-result v1

    if-ge p2, v1, :cond_1

    .line 478
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {v1, p2}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;->getItem(I)Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getId()I

    move-result v1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {p1, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 p2, p2, 0x1

    goto :goto_0

    .line 480
    :cond_1
    iget-object p2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;->getCount()I

    move-result v1

    invoke-virtual {p2, v1}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendTrackSelectAll(I)V

    .line 481
    iget-object p2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p2, p1}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->setSelectedFields(Ljava/util/ArrayList;)V

    .line 482
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p1}, Landroid/widget/ArrayAdapter;->notifyDataSetChanged()V

    .line 483
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->getSelectedFields()Ljava/util/ArrayList;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result p1

    invoke-direct {p0, p1}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setSelectioncount(I)V

    goto :goto_1

    .line 489
    :cond_2
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->getSelectedFields()Ljava/util/ArrayList;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result p1

    if-lez p1, :cond_3

    .line 490
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    iget-object p2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->getSelectedFields()Ljava/util/ArrayList;

    move-result-object p2

    invoke-virtual {p2}, Ljava/util/ArrayList;->size()I

    move-result p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;->sendTrackMultiDelete(I)V

    .line 491
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->tracksDialogs:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    iget-object p2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->getSelectedFields()Ljava/util/ArrayList;

    move-result-object p2

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;->deleteTracks(Ljava/util/List;)V

    :cond_3
    :goto_1
    return v0
.end method

.method public onActivityCreated(Landroid/os/Bundle;)V
    .locals 0

    .line 121
    invoke-super {p0, p1}, Landroidx/fragment/app/Fragment;->onActivityCreated(Landroid/os/Bundle;)V

    .line 122
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->ini()V

    return-void
.end method

.method public onBackPressed()V
    .locals 3

    .line 447
    iget-boolean v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selection:Z

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    const/4 v0, -0x1

    .line 448
    invoke-virtual {p0, v1, v0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setSelection(ZI)V

    goto :goto_0

    .line 449
    :cond_0
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-static {}, Llt/noframe/gpsfarmguide/views/FragmentMap;->newInstance()Llt/noframe/gpsfarmguide/views/FragmentMap;

    move-result-object v2

    invoke-virtual {v0, v2, v1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->setCurrentFragment(Landroidx/fragment/app/Fragment;I)V

    :goto_0
    return-void
.end method

.method public onCreateActionMode(Landroid/view/ActionMode;Landroid/view/Menu;)Z
    .locals 2

    .line 455
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Activity;->getMenuInflater()Landroid/view/MenuInflater;

    move-result-object v0

    const v1, 0x7f0d0002

    .line 456
    invoke-virtual {v0, v1, p2}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V

    .line 457
    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->Acmode:Landroid/view/ActionMode;

    const/4 p1, 0x1

    return p1
.end method

.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 2

    .line 90
    new-instance p3, Llt/noframe/gpsfarmguide/utils/RuntimePermissions;

    invoke-direct {p3}, Llt/noframe/gpsfarmguide/utils/RuntimePermissions;-><init>()V

    iput-object p3, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->runtimePermissions:Llt/noframe/gpsfarmguide/utils/RuntimePermissions;

    .line 91
    new-instance p3, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p3, v0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;-><init>(Landroid/content/Context;)V

    iput-object p3, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->fireAnalytics:Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    .line 92
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p3

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    invoke-virtual {p3, v0}, Llt/noframe/gpsfarmguide/Data;->getToolbarheight(Landroid/content/Context;)I

    move-result p3

    const/4 v0, 0x0

    invoke-virtual {p2, v0, p3, v0, v0}, Landroid/view/ViewGroup;->setPadding(IIII)V

    .line 93
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p3

    check-cast p3, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {p3}, Landroidx/appcompat/app/AppCompatActivity;->getSupportActionBar()Landroidx/appcompat/app/ActionBar;

    move-result-object p3

    const v1, 0x7f1101ed

    invoke-virtual {p0, v1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p3, v1}, Landroidx/appcompat/app/ActionBar;->setTitle(Ljava/lang/CharSequence;)V

    .line 94
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object p3

    check-cast p3, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {p3, p0}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->setOnBackPressed(Llt/noframe/gpsfarmguide/views/ActivityDrawer$FragmentOnBackPressed;)V

    .line 95
    iput v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->scroll:I

    .line 96
    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selection:Z

    .line 98
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p3

    invoke-virtual {p3}, Llt/noframe/gpsfarmguide/Data;->getPermissionsCallbacker()Llt/noframe/gpsfarmguide/PermissionsCallbacker;

    move-result-object p3

    new-instance v1, Llt/noframe/gpsfarmguide/views/FragmentTracksList$1;

    invoke-direct {v1, p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList$1;-><init>(Llt/noframe/gpsfarmguide/views/FragmentTracksList;)V

    invoke-virtual {p3, v1}, Llt/noframe/gpsfarmguide/PermissionsCallbacker;->setOnRequestedPermission(Llt/noframe/gpsfarmguide/PermissionsCallbacker$OnRequestedPermission;)V

    const p3, 0x7f0c005e

    .line 105
    invoke-virtual {p1, p3, p2, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    return-object p1
.end method

.method public onDestroy()V
    .locals 1

    .line 134
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->Acmode:Landroid/view/ActionMode;

    if-eqz v0, :cond_0

    .line 135
    invoke-virtual {v0}, Landroid/view/ActionMode;->finish()V

    .line 136
    :cond_0
    invoke-super {p0}, Landroidx/fragment/app/Fragment;->onDestroy()V

    return-void
.end method

.method public onDestroyActionMode(Landroid/view/ActionMode;)V
    .locals 1

    const/4 p1, 0x0

    .line 504
    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->Acmode:Landroid/view/ActionMode;

    const/4 p1, 0x0

    const/4 v0, -0x1

    .line 505
    invoke-virtual {p0, p1, v0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setSelection(ZI)V

    return-void
.end method

.method public onPrepareActionMode(Landroid/view/ActionMode;Landroid/view/Menu;)Z
    .locals 0

    .line 463
    iput-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->Acmode:Landroid/view/ActionMode;

    .line 464
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->getSelectedFields()Ljava/util/ArrayList;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result p1

    invoke-direct {p0, p1}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setSelectioncount(I)V

    const/4 p1, 0x1

    return p1
.end method

.method public onRequestPermissionsResult(I[Ljava/lang/String;[I)V
    .locals 1

    .line 111
    invoke-super {p0, p1, p2, p3}, Landroidx/fragment/app/Fragment;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V

    .line 112
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getPermissionsCallbacker()Llt/noframe/gpsfarmguide/PermissionsCallbacker;

    move-result-object v0

    invoke-virtual {v0, p1, p2, p3}, Llt/noframe/gpsfarmguide/PermissionsCallbacker;->onPermissionResult(I[Ljava/lang/String;[I)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    .line 115
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->runtimePermissions:Llt/noframe/gpsfarmguide/utils/RuntimePermissions;

    invoke-virtual {v0, p1, p2, p3}, Llt/noframe/gpsfarmguide/utils/RuntimePermissions;->requestPermissionResponse(I[Ljava/lang/String;[I)V

    return-void
.end method

.method public onResume()V
    .locals 0

    .line 127
    invoke-super {p0}, Landroidx/fragment/app/Fragment;->onResume()V

    .line 128
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->createList()V

    return-void
.end method

.method public removeItem(I)V
    .locals 3

    const/4 v0, 0x0

    .line 282
    :goto_0
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, -0x1

    if-ge v0, v1, :cond_1

    .line 283
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getId()I

    move-result v1

    if-ne v1, p1, :cond_0

    goto :goto_1

    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_1
    const/4 v0, -0x1

    :goto_1
    if-le v0, v2, :cond_3

    .line 287
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 288
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    if-eqz v0, :cond_2

    .line 289
    invoke-virtual {v0, p1}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;->removeItem(I)V

    .line 290
    :cond_2
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->adapt:Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;

    if-eqz v0, :cond_3

    .line 291
    invoke-virtual {v0, p1}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;->removeItem(I)V

    :cond_3
    return-void
.end method

.method public setItem(Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;)V
    .locals 4

    const/4 v0, 0x0

    .line 299
    :goto_0
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, -0x1

    if-ge v0, v1, :cond_1

    .line 300
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getId()I

    move-result v1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getId()I

    move-result v3

    if-ne v1, v3, :cond_0

    goto :goto_1

    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_1
    const/4 v0, -0x1

    :goto_1
    if-le v0, v2, :cond_2

    .line 304
    iget-object v1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-interface {v1, v0, p1}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 306
    :cond_2
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->adapt:Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;

    if-eqz p1, :cond_3

    .line 307
    iget-object v0, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->measures:Ljava/util/List;

    invoke-virtual {p1, v0}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;->setFields(Ljava/util/List;)V

    .line 308
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->adapt:Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;

    invoke-virtual {p1}, Landroid/widget/ArrayAdapter;->notifyDataSetChanged()V

    :cond_3
    return-void
.end method

.method public setSelection(ZI)V
    .locals 0

    .line 317
    iput-boolean p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selection:Z

    .line 318
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->createList()V

    .line 319
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    if-eqz p1, :cond_0

    .line 320
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    .line 321
    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 322
    iget-object p2, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p2, p1}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->setSelectedFields(Ljava/util/ArrayList;)V

    .line 323
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selectionAdapter:Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->getSelectedFields()Ljava/util/ArrayList;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result p1

    invoke-direct {p0, p1}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setSelectioncount(I)V

    .line 325
    :cond_0
    iget-boolean p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->selection:Z

    if-eqz p1, :cond_1

    .line 326
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->listView:Lse/emilsjolander/stickylistheaders/StickyListHeadersListView;

    invoke-virtual {p1, p0}, Landroid/widget/FrameLayout;->startActionMode(Landroid/view/ActionMode$Callback;)Landroid/view/ActionMode;

    goto :goto_0

    .line 328
    :cond_1
    iget-object p1, p0, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->Acmode:Landroid/view/ActionMode;

    if-eqz p1, :cond_2

    invoke-virtual {p1}, Landroid/view/ActionMode;->finish()V

    :cond_2
    :goto_0
    return-void
.end method
